<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
  <head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<link rel="stylesheet" href="css/custom/reset.css">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-box.css">
    <link rel="stylesheet" href="css/ui-color.css">
	<link rel="stylesheet" href="css/ui-res.css">
	<link rel="stylesheet" href="css/ui-media.css">
	<link rel="stylesheet" href="css/custom/base_640.css">
	<script src="js/jquery-1.8.0.min.js"></script>
    <script src="js/zy_control.js">
    </script>
    <script src="js/zy_click.js">
    </script>
	<script src="js/guoguojie.js">
    </script>
    <script>
    </script>
  </head>
<body class="um-vp" ontouchstart>
	 <div class="content">
    	<div class="discover_show">
			<div class="discover_column column1">
				
			</div>	
			<div class="discover_column column2">
				
			</div>	
			<div class="discover_column column3">
				
			</div>	
			
		</div>
		<div class="more_pro" id="more_pro" style="display:none;"><a href="javascript:;" onclick="loadShopping();">更多>></a></div>
		
    </div>
</body>
<script>

zy_init();
window.uexOnload=function(type)
{
	if(!type){
		uexWindow.setBounce("1");
		uexWindow.showBounceView("0","#FFF","0");
		uexWindow.showBounceView("1","#FFF","0");
		uexWindow.notifyBounceEvent("1","1");
		
		
		loadShopping();
	}
	
	
	
}
var times = 1;
function loadShopping(){
	uexWindow.toast(1, 5, "正在加载请稍后", 0);
	var columnIndex=1;
	var col1=$("div.column1"),col2=$("div.column2"),col3=$("div.column3"),col4=$("div.column4");
	var ajaxId = Math.floor(Math.random() * 100);
	
	var spfl = localStorage.getItem('spfl');
	uexXmlHttpMgr.open(ajaxId, 'GET', domainName+"mobile/shop.htm?spfl="+spfl+"&times="+times, 20000);
	uexXmlHttpMgr.onData = function(opcode, status, data){
		uexWindow.closeToast();
		if (status == -1){
			alert('网络连接出错，请检查网络!');
		}else if (status == 1){
			var ret = $.parseJSON(data);
			if(ret.success=='true'){
				$.each(ret.proList,function(index,item){
					var html='<div class="discover_item">'
					+'<a href="javascript:;" onclick="toProDetail(\''+item.doingId+'\',\''+item.proId+'\');"  class="pic"><img src="'+item.picUrl+'" class="block" /></a>'
					+'<span class="item_price">'+item.price+'</span></div>';
					switch(columnIndex){
						case 1:{
							col1.append(html);
							columnIndex+=1;
							break;
						}
						case 2:{
							col2.append(html);
							columnIndex+=1;
							break;
						}
						case 3:{
							col3.append(html);
							columnIndex=1;
							break;
						}
						default:break;
					}
					
				});
				if(times < ret.totalPage){
					times+=1;
					$("#more_pro").show();
				}
				
				 
			}
			
			uexXmlHttpMgr.close(ajaxId);
		}
	}
	uexXmlHttpMgr.send(ajaxId);
}

function searchboy(){
	localStorage.setItem("spfl","boy");
	location.href="discover_new_content.html";
	uexWindow.evaluateScript('discover','0','clickboy()');
}
function searchgirl(){
	localStorage.setItem("spfl","girl");
	location.href="discover_new_content.html";
	uexWindow.evaluateScript('discover','0','clickgirl()');
}
function searchmama(){
	localStorage.setItem("spfl","ymm");
	location.href="discover_new_content.html";
	uexWindow.evaluateScript('discover','0','clickymm()');
}

</script>
</html>
